package com.ruoyi.system.service.impl;

import com.ruoyi.common.core.text.Convert;
import com.ruoyi.system.domain.JiajiaShouhouConfig;
import com.ruoyi.system.mapper.JiajiaShouhouConfigMapper;
import com.ruoyi.system.service.IJiajiaShouhouConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 售后原因Service业务层处理
 * 
 * @author knd
 * @date 2021-11-04
 */
@Service
public class JiajiaShouhouConfigServiceImpl implements IJiajiaShouhouConfigService
{
    @Autowired
    private JiajiaShouhouConfigMapper jiajiaShouhouConfigMapper;

    /**
     * 查询售后原因
     * 
     * @param id 售后原因主键
     * @return 售后原因
     */
    @Override
    public JiajiaShouhouConfig selectJiajiaShouhouConfigById(Long id)
    {
        return jiajiaShouhouConfigMapper.selectJiajiaShouhouConfigById(id);
    }

    /**
     * 查询售后原因列表
     * 
     * @param jiajiaShouhouConfig 售后原因
     * @return 售后原因
     */
    @Override
    public List<JiajiaShouhouConfig> selectJiajiaShouhouConfigList(JiajiaShouhouConfig jiajiaShouhouConfig)
    {
        return jiajiaShouhouConfigMapper.selectJiajiaShouhouConfigList(jiajiaShouhouConfig);
    }

    /**
     * 新增售后原因
     * 
     * @param jiajiaShouhouConfig 售后原因
     * @return 结果
     */
    @Override
    public int insertJiajiaShouhouConfig(JiajiaShouhouConfig jiajiaShouhouConfig)
    {
        return jiajiaShouhouConfigMapper.insertJiajiaShouhouConfig(jiajiaShouhouConfig);
    }

    /**
     * 修改售后原因
     * 
     * @param jiajiaShouhouConfig 售后原因
     * @return 结果
     */
    @Override
    public int updateJiajiaShouhouConfig(JiajiaShouhouConfig jiajiaShouhouConfig)
    {
        return jiajiaShouhouConfigMapper.updateJiajiaShouhouConfig(jiajiaShouhouConfig);
    }

    /**
     * 批量删除售后原因
     * 
     * @param ids 需要删除的售后原因主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaShouhouConfigByIds(String ids)
    {
        return jiajiaShouhouConfigMapper.deleteJiajiaShouhouConfigByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除售后原因信息
     * 
     * @param id 售后原因主键
     * @return 结果
     */
    @Override
    public int deleteJiajiaShouhouConfigById(Long id)
    {
        return jiajiaShouhouConfigMapper.deleteJiajiaShouhouConfigById(id);
    }
}
